//
//  JWCategoryCollectionViewCell.m
//  见闻新闻
//
//  Created by brother on 16/3/1.
//  Copyright © 2016年 JoanBoat. All rights reserved.
//

#import "JWCategoryCollectionViewCell.h"

#import "JWCategoryModel.h"
#define  With  [UIScreen mainScreen].bounds.size.width

@interface JWCategoryCollectionViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *iconImage;

@property (weak, nonatomic) IBOutlet UILabel *CategoryLabel;
@end

@implementation JWCategoryCollectionViewCell


+ (instancetype)collectionCellWithCollectionView:(UICollectionView *)collectionView withIndexPath:(NSIndexPath *)indexPath {

    JWCategoryCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Categorycell" forIndexPath:indexPath];
    if ([UIScreen mainScreen].bounds.size.width<=320) {
        cell.CategoryLabel.font= [UIFont fontWithName:@"Arial" size:10];

    }else{
    
        cell.CategoryLabel.font= [UIFont fontWithName:@"Arial" size:16];    }
//       CGSize tempSize = CGSizeMake(With/3.0, With/3.0);
    return cell;
    


}





-(void)setJWMyCategoryModel:(JWCategoryModel *)JWMyCategoryModel {

 
    _JWMyCategoryModel = JWMyCategoryModel;
    
    self.CategoryLabel.text = self.JWMyCategoryModel.title;
    self.iconImage.image = [UIImage imageNamed:self.JWMyCategoryModel.icon];
    
    

}

@end
